package object;

public class IntegerDemo {
    public static void main(String[] args) {
      String a = "66";
      int a1 = Integer.parseInt(a);
        System.out.println(a1);

        String b = "66.66";
        double b2 = Double.parseDouble(b);
        System.out.println(b2);




        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println("int的最大值为:" + max + ",int的最小值为:" + min);

        long max1 = Long.MAX_VALUE;
        long min1 = Long.MIN_VALUE;
        System.out.println("long的最大值为:" + max1 + ",long的最小值为:" + min1);



        Integer i =6;//触发自动装箱
        int j = i;//出发自动拆箱

        Integer i1 = new Integer(666);
        Integer i2 = new Integer(666);
        System.out.println(i1==i2);

        Integer i3 = Integer.valueOf(66);
        Integer i4 = Integer.valueOf(66);
        System.out.println(i3==i4);
        System.out.println(i3.equals(i4));


    }
}
